package ua.org.nuos.sdms.clientgui.client.components.factory;

import com.vaadin.ui.Component;
import com.vaadin.ui.Label;

/**
 * Created by IntelliJ IDEA.
 * User: dio
 * Date: 06.03.12
 * Time: 20:02
 * To change this template use File | Settings | File Templates.
 */
public class SeparatorFactory {
    public static Component getHorizontal() {
        Label horizontal = new Label("<hr />", Label.CONTENT_XHTML);
        horizontal.setHeight("7");
        return horizontal;
    }

    public static Component getVertical() {
        Label vertical = new Label("<div style=\"width: 1px; height: 100%; background-color: #2D2D2D\">&nbsp;</div>", Label.CONTENT_XHTML);
        vertical.setWidth("3");
        vertical.setHeight("100%");
        return vertical;
    }

    public static Component getNarrowHorizontal() {
        Label horizontal = new Label("<hr /><br />", Label.CONTENT_XHTML);
        horizontal.setHeight("3");
        return horizontal;
    }

    public static Component getVertical(String style) {
        Label vertical = new Label(String.format("<div style=\"%s\">&nbsp;</div>", style), Label.CONTENT_XHTML);
        vertical.setWidth("3");
        vertical.setHeight("100%");
        return vertical;
    }
}

